import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import Components from '@uni-helper/vite-plugin-uni-components'
import { WotResolver } from '@uni-helper/vite-plugin-uni-components/resolvers'
import Uni from '@uni-helper/plugin-uni'

export default defineConfig({
  // base: './',
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    }
  },
  css: {
    preprocessorOptions: {
    less: {
      additionalData: '@import "@/static/styles/variables.less";'
    }
    }
  },
  plugins: [
    Components({
      dts: true,
      resolvers: [WotResolver()]
    }),
    // https://github.com/uni-helper/plugin-uni
      Uni(),
  ]
})


